package com.tjetc.dao;

import com.tjetc.domian.Communitycomplaint;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface CommunitycomplaintMapper {
    int deleteByPrimaryKey(int complaintid);

    int insert(Communitycomplaint record);

    int insertSelective(Communitycomplaint record);

    Communitycomplaint selectByPrimaryKey(Integer complaintid);

    int updateByPrimaryKeySelective(Communitycomplaint record);

    int updateByPrimaryKey(Communitycomplaint record);
    @Select("select * from communitycomplaint where ResidentID=#{residentid}")
    List<Communitycomplaint> select( Integer residentid );

    @Select("select ResidentID,ComplaintDate,ComplaintTime,Description,STATUS from communitycomplaint where " +
            "residentid=#{residentid}")
    List<Communitycomplaint> selectByRid(Integer residentid);


    List<Communitycomplaint> selectAll();

    @Update("update communitycomplaint set Status=#{status} where ComplaintID=#{complaintid}")
    int updateBycomplainId(Communitycomplaint communitycomplaint);
}
